package com.gxar.marketdelivery.application.command;

import com.gxar.marketdelivery.application.context.DeliveryContext;
import com.gxar.marketdelivery.shared.model.DeliveryRuleModel;
import org.springframework.core.Ordered;

/**
 * @author nice
 * @version 1.0
 * @created 2023/8/2.
 */
public interface IRuleMatcher extends Ordered {

    int GRAY = 1;
    int TIME = 2;
    int USER_CONSTRAINTS = 3;
    int CITY = 4;
    int CHANNEL = 5;
    int EXT = 6;

    /**
     * 判断投放计划是否满足条件
     *
     * @param context
     * @param ruleModel
     * @return
     */
    boolean isMatch(DeliveryContext context, DeliveryRuleModel ruleModel);
}
